package com.ruoyi.system.mapper;

import java.util.List;
import com.ruoyi.system.domain.survey.SurveyApproval;

/**
 * 问卷审批Mapper接口
 * 
 */
public interface SurveyApprovalMapper 
{
    /**
     * 查询问卷审批
     * 
     * @param approvalId 问卷审批ID
     * @return 问卷审批
     */
    public SurveyApproval selectSurveyApprovalById(Long approvalId);

    /**
     * 查询问卷审批列表
     * 
     * @param surveyApproval 问卷审批
     * @return 问卷审批集合
     */
    public List<SurveyApproval> selectSurveyApprovalList(SurveyApproval surveyApproval);
    
    /**
     * 根据问卷ID查询最新审批记录
     * 
     * @param surveyId 问卷ID
     * @return 问卷审批
     */
    public SurveyApproval selectLatestApprovalBySurveyId(Long surveyId);
    
    /**
     * 根据问卷ID查询审批历史
     * 
     * @param surveyId 问卷ID
     * @return 问卷审批集合
     */
    public List<SurveyApproval> selectSurveyApprovalHistoryBySurveyId(Long surveyId);

    /**
     * 新增问卷审批
     * 
     * @param surveyApproval 问卷审批
     * @return 结果
     */
    public int insertSurveyApproval(SurveyApproval surveyApproval);

    /**
     * 修改问卷审批
     * 
     * @param surveyApproval 问卷审批
     * @return 结果
     */
    public int updateSurveyApproval(SurveyApproval surveyApproval);

    /**
     * 删除问卷审批
     * 
     * @param approvalId 问卷审批ID
     * @return 结果
     */
    public int deleteSurveyApprovalById(Long approvalId);

    /**
     * 批量删除问卷审批
     * 
     * @param approvalIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteSurveyApprovalByIds(Long[] approvalIds);
    
    /**
     * 根据问卷ID删除审批记录
     * 
     * @param surveyId 问卷ID
     * @return 结果
     */
    public int deleteSurveyApprovalBySurveyId(Long surveyId);
} 